<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<!-- <script>
  function run () {
    this.num++
  }
  let num = 10
  let user1 = {
    num: 10, run
  }
  let user2 = { num: 10, run }
  run()
  user1.run()
  user2.run()
  const run1 = run.bind(user1)
  const run2 = run1.bind(user2)
  run1()
  run2()
  console.log(window.num)
  console.log(userl.num)
  console.log(user2.num)
</script> -->
<script>
  function Foo () {
    getName = function () { console.log(1) }
    return this

  }
  Foo.getName = function () { console.log(2) }
  Foo.prototype.getName = function () { console.log(3) }
  var getName = function () { console.log(4) }
  function getName () {
    console.log(5)
  }
  Foo.getName()
  getName()
  Foo().getName()
  getName()
  new Foo().getName()
</script>

</html>